package com.blockchain.front.servlets.financial;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.blockchain.framework.service.ServiceSession;
import com.blockchain.front.service.financial.FinancialManage;
import com.blockchain.util.parser.IntegerParser;

public class CxWt extends AbstractFinancialServlet {
	private static final long serialVersionUID = 1L;

	@Override
	protected void processGet(HttpServletRequest request, HttpServletResponse response, ServiceSession serviceSession)
			throws Throwable {
		processPost(request, response, serviceSession);
	}

	@Override
	protected void processPost(HttpServletRequest request, HttpServletResponse response, ServiceSession serviceSession)
			throws Throwable {
		int id = IntegerParser.parse(request.getParameter("id"));
		int scid = IntegerParser.parse(request.getParameter("scid"));
		FinancialManage manage = serviceSession.getService(FinancialManage.class);
		manage.cxWt(id, scid);
		sendRedirect(request, response, getController().getURI(request, Wtjl.class));
	}
}
